<template>
  <div class="child">
    <h1>我是子组件{{ infoStore.count }}</h1>
    <button @click="updateCount">点击我修改仓库数据</button>
  </div>
</template>

<script setup lang="ts">
import useInfoStore from "../../store/modules/info";

let infoStore = useInfoStore();

console.log(infoStore);

const updateCount = () => {
  //调用仓库的方法
  infoStore.updateNum(3, 4);
};
defineProps(["money"]);
let emit5 = defineEmits(["update:money"]);
</script>

<style scoped>
.child {
  width: 40vw;
  height: 100px;
  background: #ccc;
}
</style>
